﻿@model RafikiSIS_Site.Models.ChangePasswordViewModel
@{
    ViewBag.Title = "Impersonate User";
}

<div style="position: relative; width:90%; left:5%">

    <div id="adminsearch">
        <h2>Secret Administrative Search</h2>
        <p>Allows a much wider range of searching - including the student's ID number, parent and guardian emails.</p>
        <input id="adminsearchbox" data-role="autocomplete"
               data-text-field="FullName" data-filter="contains"
               data-bind="source: adminLookupSource"
               data-highlight-first="true"
               class="inputbox" />
    </div>
    <div style="position: relative; width:90%; left:5%">
        @using (Html.BeginForm("ImpersonateUser", "Account"))
        {
            @Html.AntiForgeryToken()

            <div>
                <h4>Enter USER ID Number to either Impersonate that user or Change their password.</h4>
                <p>
                    UserID: <input type="text" name="UserID" /><br />
                    <button type="submit" name="commandtxt" value="impersonate">Impersonate</button>
                    <button type="submit" name="commandtxt" value="impersonateNEU">Impersonate Incomplete User</button>
                </p>
            </div>
            <div>
                <p>
                    Create New Password for this User: <input type="password" name="NewPassword" /><br />
                    Confirm Password:           <input type="password" name="ConfirmPassword" /><br />
                    <button type="submit" name="commandtxt" value="changepw">Change Password</button>
                </p>
            </div>
            <p>@ViewBag.ResultMessage</p>
        }
        </div>




        <script>


            $(document).ready(function () {
                kendo.bind($("#adminsearch"), viewModel);
                $("#adminsearchbox").value = "";
                $("#adminsearchbox").focus();
            });
        </script>

    </div>




